In the previous step you created a new Universal Windows project and added a Rectangle control with a gradient to the application. In this step you'll continue by adding a C1RangeSlider control that will control the gradient fill in the Rectangle.
Complete the following steps:
XAML Copy Code<Xaml:C1RangeSlider x:Name="c1rs1" />
By giving it a unique identifier, you'll be able to access the control in code.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50">This will set each edge the same distance away from the grid's border.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50" Orientation="Vertical">By default Orientation is Horizontal and the control appears across the page.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50" Orientation="Vertical" UpperValue="1">The upper thumb will now begin at 1.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50" Orientation="Vertical" UpperValue="1" Maximum="1">Users will now not be able to select a value greater than 1.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50" Orientation="Vertical" UpperValue="1" Maximum="1" ValueChange="0.1">When you click on the slider track at run time, the slider thumb will now move by 0.1 units.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" Margin="50" Orientation="Vertical" UpperValue="1" Maximum="1" ValueChange="0.1" Opacity="0.8">By default this property is set to 1 and the control appears completely opaque. Changing this to a lower number will make the control appear slightly transparent.
XAML Copy Code <Xaml:C1RangeSlider x:Name="c1rs1" HorizontalAlignment="Left" Margin="671,10,0,90" Orientation="Vertical" UpperValue="1" Maximum="1" ValueChange="0.1" Opacity="0.8" LowerValueChanged="c1rs1_LowerValueChanged" UpperValueChanged="c1rs1_UpperValueChanged" />You'll add code for these event handlers in a later step.
You've successfully set up your application's user interface, but right now the slider will do nothing if you move it. In the next step you'll add code to your application to add functionality.